package com.teradata.bigdata.iop.controller;

import com.teradata.bigdata.iop.common.R;
import com.teradata.bigdata.iop.entity.UserVo;
import com.teradata.bigdata.iop.security.JwtHelper;
import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Project:
 * @Description:
 * @Version 1.0.0
 * @Throws SystemException:
 * @Author: <li>2019/1/16/016 Administrator Create 1.0
 * @Copyright ©2018-2019 al.github
 * @Modified By:
 */
@RestController
@RequestMapping("/token")
@AllArgsConstructor
public class TokenController extends BaseController{

    @GetMapping
    public R getToken(){
        String jwtToken = JwtHelper.generateToken("123",456);
        return R.ok().put("token",jwtToken);
    }
}
